home *** CD-ROM | disk | FTP | other *** search
/ Champak 66 / Vol 66.iso / games / doeo.swf / scripts / DefineButton2_1106 / BUTTONCONDACTION on(rollOver).as
Encoding:
Text File  |  2013-04-24  |  1.6 KB  |  71 lines

  1. on(rollOver){
  2.    if(_root.enterok != 1)
  3.    {
  4.       _parent._rotation = random(360);
  5.       if(_parent._y > 225)
  6.       {
  7.          _parent._y -= 70 + random(70);
  8.          if(_parent._x > 275)
  9.          {
  10.             _parent._x -= 70 + random(120);
  11.          }
  12.          else
  13.          {
  14.             _parent._x += 70 + random(120);
  15.          }
  16.       }
  17.       else
  18.       {
  19.          _parent._y += 70 + random(70);
  20.          if(_parent._x > 275)
  21.          {
  22.             _parent._x -= 70 + random(120);
  23.          }
  24.          else
  25.          {
  26.             _parent._x += 70 + random(120);
  27.          }
  28.       }
  29.    }
  30.    else if(_root.osama_health > 0)
  31.    {
  32.       _root.stage.osama.b += 1;
  33.       _root.osama_health -= 1;
  34.       ow = random(4);
  35.       if(ow == 1)
  36.       {
  37.          _root.ow1.start();
  38.       }
  39.       else if(ow == 2)
  40.       {
  41.          _root.ow2.start();
  42.       }
  43.       else if(ow == 3)
  44.       {
  45.          _root.ow3.start();
  46.       }
  47.       else
  48.       {
  49.          _root.ow4.start();
  50.       }
  51.       if(_root.difficulty == "hard")
  52.       {
  53.          _root.stage.attachMovie("hardexplosion","hardexplosion",2);
  54.          _root.stage.hardexplosion._x = _root.stage.osama._x;
  55.          _root.stage.hardexplosion._y = _root.stage.osama._y;
  56.          _parent.play();
  57.       }
  58.       else
  59.       {
  60.          _root.stage.attachMovie("doeoxplosion","doeoxplosion",2);
  61.          _root.stage.doeoxplosion._x = _root.stage.osama._x;
  62.          _root.stage.doeoxplosion._y = _root.stage.osama._y;
  63.          _parent.play();
  64.       }
  65.    }
  66.    else
  67.    {
  68.       _parent.gotoAndPlay(40);
  69.    }
  70. }
  71.